package com.biubiushop.entity;

import com.biubiushop.util.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper=true)
@Entity
@Table(name = "commodity")
@org.hibernate.annotations.Table(appliesTo = "commodity",comment = "纸巾价格表")
public class Commodity extends BaseEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(nullable = false,columnDefinition = "varchar(16) comment '商品名称'")
	private String name;
	
	@Column(nullable = false,columnDefinition = "decimal(8,2) comment '单价'")
	private BigDecimal price;

	@Column(nullable = false,columnDefinition = "int(11) comment '纸巾长度(单位:厘米)'")
	private Integer length;

	@Column(columnDefinition = "varchar(64) DEFAULT NULL comment '说明'")
	private String description;

}
